package com.zgjkhis.modules.charges.service.dto;

import com.alibaba.fastjson.JSONObject;
import com.zgjkhis.modules.charges.domain.Logistics;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author yxl
 * @Description
 * @Date 2021/7/20 13:46
 **/
@Data
@NoArgsConstructor
public class LogisticsStatusDto {

    @ApiModelProperty(value = "处方单号")
    private String orderNo;

    @ApiModelProperty(value = "业务订单号")
    private String bspOrderNo;

    @ApiModelProperty(value = "顺丰单号")
    private String mailNo;

    @ApiModelProperty(value = "订单状态【7待发货，8待收货，10已完成，11交易关闭】")
    private Integer orderStatus;

    public LogisticsStatusDto(Logistics logistics, JSONObject json) {
        this.orderStatus = json.getInteger("orderStatus");
        this.orderNo = logistics.getOrderNo();
        this.bspOrderNo = logistics.getBspOrderNo();
        this.mailNo = logistics.getMailNo();
    }

}
